'libtgfx - Threaded Graphics library for FreeBASIC
'Copyright (C) 2013  Ebben Feagan <sir@mud.owlbox.net>
'
'This library is free software; you can redistribute it and/or
'modify it under the terms of the GNU Lesser General Public
'License as published by the Free Software Foundation; either
'version 2.1 of the License, or (at your option) any later version.
'
'This library is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
'Lesser General Public License for more details.
'
'You should have received a copy of the GNU Lesser General Public
'License along with this library; if not, write to the Free Software
'Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA


#include once "fbgfx.bi"

namespace tgfx

declare sub null_free( byval x as any ptr )
declare sub GfxHandler( byval _u as any ptr )

type sub_data
    d as sub( byval as any ptr )
    x as any ptr
    declare constructor( byval f as sub(byval as any ptr), byval x_ as any ptr )
end type

type int_data
    d as integer
    declare constructor( byval rhs as integer = 0 )
end type

type str_data
    d as zstring ptr
    p as any ptr
    l as Coord
    declare constructor( byref x as const string, byval x_ as any ptr = 0, byval l_ as Coord = Coord() )
end type

type init_data
    d as Coord
    m as GFXmode
    f as integer
    declare constructor( byref p as Coord, byval mo as GFXmode, byval fl as integer )
end type

type line_data
    d as any ptr
    f as Coord
    s as Coord
    c as uinteger
    box as bool
    fill as bool
    declare constructor( byval d_ as any ptr, byval f_ as Coord, byval s_ as Coord, byval c_ as uinteger, byval box_ as bool, byval fi_ as bool )
end type

declare sub str_d_free( byval x as any ptr )
declare sub init_d_free( byval x as any ptr )

end namespace

common shared as CommChannel ptr Comm

namespace std
#include once "crt/stdlib.bi"
#include once "crt/string.bi"
end namespace
